/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package flicker;

import gizmo.*;
import flicker.FlickrImageFinder;

/**
 *
 * @author Steven
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here

        int count=0;

        String searchTags="negro naranja azul verde amarillo rojo violeta rosa girasol sol playa mar estrella";//Buscar

        String[] tags= searchTags.split(" ");
        flicker.FlickrImageFinder Flickr = new FlickrImageFinder();
        String results ="";
        for(int j=0;j<tags.length;j++){
            try{results = Flickr.getImages(tags[j]);}catch(Exception e){results="";}
            if(!results.isEmpty()){
                String [] images = results.split(" ");
                for(int i=0;i<images.length;i++){
                    System.out.print("Color: "+tags[j]+" "+i+"/"+images.length+" ");
                    try{Image x = new Image(images[i]);}catch(Exception e){System.out.print("Error");}
                    System.out.println();
                }
                }
            }
        }
    }